<script setup>
const options = ref({
  tooltip: {
    trigger: 'item'
  },
  legend: {
    top: '5%',
    left: 'center'
  },
  title: {
    text: '题型汇总(个)'
  },
  toolbox: {
    feature: {
      saveAsImage: {}
    }
  },
  series: [
    {
      name: '题型汇总',
      type: 'pie',
      radius: ['40%', '70%'],
      avoidLabelOverlap: false,
      itemStyle: {
        borderRadius: 10,
        borderColor: '#fff',
        borderWidth: 2
      },
      label: {
        show: false,
        position: 'center'
      },
      emphasis: {
        label: {
          show: true,
          fontSize: 40,
          fontWeight: 'bold'
        }
      },
      labelLine: {
        show: false
      },
      data: [
        { value: 160, name: '单选题' },
        { value: 125, name: '多选题' },
        { value: 65, name: '判断题' },
        { value: 23, name: '简答题' }
      ]
    }
  ]
})
</script>

<template>
  <Echart width="100%" :options="options" />
</template>

<style lang="scss" scoped></style>
